package com.itlaobing.binary;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.Charset;

/**
 * 理解URL解码操作 : URLDecoder.decode( String , Charset )
 */
public class URLDecodeTest {

    public static void main(String[] args) {

        String encoded = "%E5%BC%A0%E4%B8%89%E4%B8%B0" ;
        System.out.println( encoded );

        Charset charset = Charset.forName( "UTF-8" );

        String decoded = URLDecoder.decode( encoded , charset );
        System.out.println( decoded );

    }

}
